/*package net.visibleblue.android.zxing.result;

import java.io.OutputStream;

import net.visibleblue.android.serialintents.IntentInfo;
import net.visibleblue.xstream.IntentConverter;
import net.visibleblue.xstream.IntentInfoConverter;

import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.io.xml.DomDriver;

public final class XStreamParsedResult {

	public static final XStream XStream;
	
	static
	{
		XStream = new XStream(new DomDriver());
		XStream.alias("info", IntentInfo.class);
		XStream.registerConverter(new IntentConverter());
		XStream.registerConverter(new IntentInfoConverter());
	}
	
	private XStreamParsedResult(){}
	
	public static final ParsedReaderResult getInstance(String rawText)
	{
		Object obj = null;
		try{obj = XStream.fromXML(rawText);}
		catch(Throwable e)
		{
			return null;
		}
		
		if(obj.getClass().isArray())
			return new SeriesParsedResult(obj);
		else if(obj instanceof IntentInfo)
			return new IntentParsedResult((IntentInfo)obj);
		else if(obj instanceof String)
			return ParsedReaderResult.parseReaderResult((String)obj);
		else throw new IllegalArgumentException("XStreamParsedResult elements must be" +
				"of type String or IntentInfo, not " + obj.getClass().toString());
		
	}
	
	public static void getXML(Object[] series, OutputStream out)
	{
		XStream.toXML(series, out);
	}
}*/
